package top.yxf.spring.beans.factory.support;

import top.yxf.spring.core.io.DefaultResourceLoader;
import top.yxf.spring.core.io.ResourceLoader;

/**
 * @author xs.wu
 */
public abstract class AbstractBeanDefinitionReader implements BeanDefinitionReader {

    private final BeanDefinitionRegistry registry;

    private ResourceLoader resourceLoader;
    public AbstractBeanDefinitionReader(BeanDefinitionRegistry registry, ResourceLoader resourceLoader) {
        this.resourceLoader = resourceLoader;
        this.registry = registry;
    }

    protected AbstractBeanDefinitionReader(BeanDefinitionRegistry registry) {
       this(registry,new DefaultResourceLoader());
    }

    @Override
    public BeanDefinitionRegistry getRegistry() {
        return registry;
    }

    @Override
    public ResourceLoader getResourceLoader() {
        return resourceLoader;
    }

}
